const { Sequelize } = require('sequelize');
const {
    MYSQL_HOST,
    MYSQL_PORT,
    MYSQL_USER,
    MYSQL_PASSWORD,
    MYSQL_DB } = require('../config/config_default')
const sequelize = new Sequelize(MYSQL_DB, MYSQL_USER, MYSQL_PASSWORD, {
    host: MYSQL_HOST,
    dialect: 'mysql'
});

// sequelize.authenticate().then(() => {
//     console.log('数据库连接成功');

// }).catch((error) => {
//     console.log(error);

// })
module.exports = sequelize